>> TGS_phase_analysis('Cr_single_crystal-2019-06-30-06.40um-75degrees#3-POS-1.txt','Cr_single_crystal-2019-06-30-06.40um-75degrees#3-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =     0.02558  (0.02471, 0.02645)
       k =   2.662e-05  (2.605e-05, 2.718e-05)
       beta =   4.106e-06  (2.79e-06, 5.422e-06)
       B =    0.009093  (0.008962, 0.009224)
       p =       3.106  (3.096, 3.117)
       t =   2.761e-08  (2.702e-08, 2.82e-08)
       D =   0.0005122  (0.0004807, 0.0005438)
     Problem parameters:
       q =   9.817e+05
       start_time =       9e-10
       peak_freq =   5.516e+08

ans =

   5.5158e+08